#include "thread_pool.hpp"
#include "Task.hpp"
#include <ctime>
#include <unistd.h>

using namespace ns_task;
using namespace ns_thread_pool;

int main()
{
    // ThreadPool<Task> *tp = new ThreadPool<Task>(2);
    // tp->InitThreadPool();
    
    srand((long long)time(nullptr));
    while(true)
    {
        Task t(rand()%20+1, rand()%10+1, "+-*/%"[rand()%5]);
        ThreadPool<Task>::GetInstance()->PushTask(t);
        std::cout << ThreadPool<Task>::GetInstance()<<std::endl;
        sleep(1);
    }
    return 0;
}